<div class="panel panel-default panel-intro">
    
    <div class="panel-heading">
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field="status">
            <li class="active"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
            {foreach name="statusList" item="vo"}
            <li><a href="#t-{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
            {/foreach}
        </ul>
    </div>


    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('goods/goods/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('goods/goods/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                        <a href="javascript:;" class="btn btn-success btn-monitor btn-disabled disabled {:$auth->check('count/monitor/add')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('添加预警')}</a>
                        <a href="javascript:;" class="btn btn-primary  btn-stockgoods {:$auth->check('goods/goods/stockgoods')?'':'hide'}" title="{:__('Import')}" id="btn-stockgoods" data-url="goods/goods/stockgoods" data-mimetype="csv,xls,xlsx" data-multiple="false">
                            <i class="fa fa-list-ul" aria-hidden="true"></i>
                            {:__('商品库存状况')}
                        </a>
                        <a href="javascript:;" class="btn btn-primary  btn-editlog {:$auth->check('goods/goods/editlog')?'':'hide'}" title="{:__('Import')}" id="btn-editlog" data-url="goods/goods/editlog" data-mimetype="csv,xls,xlsx" data-multiple="false">
                            <i class="fa fa-list-ul" aria-hidden="true"></i>
                            {:__('商品修改记录')}
                        </a>
<!--                        <a href="javascript:;" class="btn btn-primary  btn-purchasegoods {:$auth->check('goods/goods/purchasegoods')?'':'hide'}" title="{:__('Import')}" id="btn-purchasegoods" data-url="goods/goods/purchasegoods" data-mimetype="csv,xls,xlsx" data-multiple="false">-->
<!--                            <i class="fa fa-list-ul" aria-hidden="true"></i>-->
<!--                            {:__('商品采购状况')}-->
<!--                        </a>-->
<!--                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('goods/goods/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>-->
<!--                        <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('goods/goods/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<!--                        <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('goods/goods/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="goods/goods/Import" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->


<!--                        <div class="dropdown btn-group {:$auth->check('goods/goods/multi')?'':'hide'}">-->
<!--                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!--                            <ul class="dropdown-menu text-left" role="menu">-->
<!--                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
<!--                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
<!--                            </ul>-->
<!--                        </div>-->

                        
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('goods/goods/edit')}" 
                           data-operate-del="{:$auth->check('goods/goods/del')}" 
                           data-operate-addpgoods="{:$auth->check('goods/goods/addpgoods')}"
                           data-operate-lists="{:$auth->check('goods/goods/lists')}"
                           data-operate-plists="{:$auth->check('goods/goods/plists')}"
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
<script id="customformtpl" type="text/html">
    <!--form表单必须添加form-commsearch这个类-->
    <form action="" class="form-commonsearch">
        <div style="border-radius:2px;margin-bottom:10px;background:#f5f5f5;padding:15px 20px;">
            <div class="row">
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">商品名称</label>
                        <!--隐式的operate操作符，必须携带一个class为operate隐藏的文本框,且它的data-name="字段",值为操作符-->
                        <input class="operate" type="hidden" data-name="title" value="like"/>
                        <div>
                            <input class="form-control" type="text" name="title" placeholder="请输入查找的标题" value=""/>
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">商品编号</label>
                        <input type="hidden" class="operate" data-name="number" value="like"/>
                        <div>
                            <input id="c-number"  class="form-control " name="number" type="text"
                                   value="" style="display:block;">
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">商品规格</label>
                        <input type="hidden" class="operate" data-name="specs" value="like"/>
                        <div>
                            <input id="c-specs"  class="form-control " name="specs" type="text"
                                   value="" style="display:block;">
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">商品分类</label>
                        <input type="hidden" class="operate" data-name="name" value="="/>
                        <div>

                            <input id="c-name" data-source="goods/cate/index" data-primary-key="name"
                                   class="form-control selectpage" name="name" type="text"
                                   value="" style="display:block;">
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">出库仓库</label>
                        <input type="hidden" class="operate" data-name="name" value="="/>
                        <div>

                            <input id="c-storehouse_id" data-rule="required" data-source="data/storehouse/index" data-field="name" class="form-control selectpage" name="storehouse_id" type="text" value="">
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label">商品产地</label>
                        <input type="hidden" class="operate" data-name="place_origin" value="like"/>
                        <div>
                            <input id="c-place_origin" class="form-control " name="place_origin" type="text"
                                   value="" style="display:block;">
                        </div>
                    </div>
                </div>
                <div class="col-xs-12 col-sm-6 col-md-3">
                    <div class="form-group">
                        <label class="control-label"></label>
                        <div class="row">
                            <div class="col-xs-6">
                                <input type="submit" class="btn btn-success btn-block" value="提交"/>
                            </div>
                            <div class="col-xs-6">
                                <input type="reset" class="btn btn-primary btn-block" value="重置"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</script>
<!--@formatter:off-->
<script id="operatetpl" type="text/html">
    <div class="operate" data-id="" data-name="command">
                <span class="btn-group">
                    <a href="###" class="btn btn-xs btn-primary btn-success " data-type="free" data-donateimage="" >
                        <%=item.sync_status%></a>
                    <a class="btn btn-xs btn-success dropdown-toggle" data-toggle="dropdown" href="javascript:;" aria-expanded="false">
                        <span class="fa fa-caret-down"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="javascript:;" class="btn-install" data-type="free" data-goods_id="<%=item.id%>" data-version="1">及时更新</a></li>
                        <li><a href="javascript:;" class="btn-install" data-type="free" data-goods_id="<%=item.id%>" data-version="2">定时更新</a></li>
                        <li><a href="javascript:;" class="btn-install" data-type="free" data-goods_id="<%=item.id%>" data-version="3">不更新</a></li>
                    </ul>
                </span>
    </div>
</script>
<!--@formatter:on-->
